<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Strict//EN">
<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<title>Vision plugin - simple image processing</title>
<link rel="stylesheet" type="text/css" href="../style.css">
</head>

<body>

<div align="center">
<table class=allEncompassingTable >
 <tr>
  <td >
<p><a href="../index.html" TARGET="_top"><img src="images/homeImg.png"></a></p>



<h1>Vision Plugin - Simple Image Processing</h1>

<p>The <a href="https://github.com/CoppeliaRobotics/simExtVision" target="_blank">vision plugin</a> hosts, among others, simple image processing functions, that are mainly used for backward compatibility reasons. Other, more powerful image processing functions can be found in the <a href="imageApi.htm">OpenCV plugin</a>.</p>
<p>Color values are specified in RGB, with each component in [0;1].</p>


<h3 class=subsectionBarTab><a name="simVision.addBuffer1ToWorkImg" id="simVision.addBuffer1ToWorkImg"></a>simVision.addBuffer1ToWorkImg</h3>
<table class=apiTableTab>
<tr class=apiTableTr> 
<td class=apiTableLeftDescr>
Description 
</td> 
<td class=apiTableRightDescr>
Performs a pixel wise addition between the <em>work image</em> and buffer <em>buffer1</em>, and stores the result in the <em>work image</em>. See also <a href="#simVision.addWorkImgToBuffer1">simVision.addWorkImgToBuffer1</a> and <a href="#simVision.subtractBuffer1FromWorkImg">simVision.subtractBuffer1FromWorkImg</a>.</td>
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLSyn>
Lua synopsis
</td> 
<td class=apiTableRightLSyn>simVision.addBuffer1ToWorkImg(number handle)</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLParam>Lua parameters</td> 
<td class=apiTableRightLParam>
<div><strong>handle</strong>: handle of the vision sensor, or sim.handle_self if the object attached to this script is the vision sensor.</div>
</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLRet>
Lua return values
</td> 
<td class=apiTableRightLRet>
<div>none</div></td> 
</tr> 
</table> 
<br>





<h3 class=subsectionBarTab><a name="simVision.addWorkImgToBuffer1" id="simVision.addWorkImgToBuffer1"></a>simVision.addWorkImgToBuffer1</h3>
<table class=apiTableTab>
<tr class=apiTableTr> 
<td class=apiTableLeftDescr>
Description 
</td> 
<td class=apiTableRightDescr>
Performs a pixel wise addition between the <em>work image</em> and buffer <em>buffer1</em>, and stores the result in buffer <em>buffer1</em>. See also <a href="#simVision.addBuffer1ToWorkImg">simVision.addBuffer1ToWorkImg</a> and <a href="#simVision.subtractWorkImgFromBuffer1">simVision.subtractWorkImgFromBuffer1</a>.</td>
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLSyn>
Lua synopsis
</td> 
<td class=apiTableRightLSyn>simVision.addWorkImgToBuffer1(number handle)</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLParam>Lua parameters</td> 
<td class=apiTableRightLParam>
<div><strong>handle</strong>: handle of the vision sensor, or sim.handle_self if the object attached to this script is the vision sensor.</div>
</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLRet>
Lua return values
</td> 
<td class=apiTableRightLRet>
<div>none</div></td> 
</tr> 
</table> 
<br>





<h3 class=subsectionBarTab><a name="simVision.binaryWorkImg" id="simVision.binaryWorkImg"></a>simVision.binaryWorkImg</h3>
<table class=apiTableTab>
<tr class=apiTableTr> 
<td class=apiTableLeftDescr>
Description 
</td> 
<td class=apiTableRightDescr>
Transforms the <em>work image</em> into a binary image, with optional triggering.</td>
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLSyn>
Lua synopsis
</td> 
<td class=apiTableRightLSyn>number trigger,string packedPacket=simVision.binaryWorkImg(number handle,number threshold,number oneProportion,number oneTol,number xCenter,number xCenterTol,number yCenter,number yCenterTol,number orient,number orientTol,number roundness,bool enableTrigger,table_3 overlayColor={1.0,0.0,1.0}))</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLParam>Lua parameters</td> 
<td class=apiTableRightLParam>
<div><strong>handle</strong>: handle of the vision sensor, or sim.handle_self if the object attached to this script is the vision sensor.</div>
<div><strong>threshold</strong>: the threshold for binary 0 or binary 1.</div>
<div><strong>oneProportion</strong>: the nominal binary 1 pixels relative amount (0-1), for triggering.</div>
<div><strong>oneTol</strong>: the allowed tolerance for <em>oneProportion</em>.</div>
<div><strong>xCenter</strong>: the nominal x center of binary 1 pixels (0-1), for triggering.</div>
<div><strong>xCenterTol</strong>: the allowed tolerance for <em>xCenter</em>.</div>
<div><strong>yCenter</strong>: the nominal y center of binary 1 pixels (0-1), for triggering.</div>
<div><strong>yCenterTol</strong>: the allowed tolerance for <em>yCenter</em>.</div>
<div><strong>orient</strong>: the nominal orientation, in radians, of the bounding box around binary 1 pixels (0-1), for triggering.</div>
<div><strong>orientTol</strong>: the allowed tolerance for <em>orient</em>.</div>
<div><strong>roundness</strong>: the nominal roundness value of the bounding box around binary 1 pixels (0-1), for triggering.</div>
<div><strong>enableTrigger</strong>: if true and the triggering conditions are met, then return value <em>trigger</em> will be true.</div>
<div><strong>overlayColor</strong>: an overlay color used to visualize triggering conditions. Set to nil for no overlay.</div>
</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLRet>
Lua return values
</td> 
<td class=apiTableRightLRet>
<div><strong>trigger</strong>: true if the filter has triggered.</div>
<div><strong>packedPacket</strong>: a packed packet (use <a href="regularApi/simUnpackFloatTable.htm">sim.unpackFloatTable</a> to unpack) containing:</div>
<div>a) the binary image <em>proportion</em> value</div>
<div>b) the binary image <em>posX</em> value</div>
<div>c) the binary image <em>posY</em> value</div>
<div>d) the binary image <em>angle</em> value</div>
<div>e) the binary image <em>roundness</em> value</div>
</td> 
</tr> 
</table> 
<br>





<h3 class=subsectionBarTab><a name="simVision.blobDetectionOnWorkImg" id="simVision.blobDetectionOnWorkImg"></a>simVision.blobDetectionOnWorkImg</h3>
<table class=apiTableTab>
<tr class=apiTableTr> 
<td class=apiTableLeftDescr>
Description 
</td> 
<td class=apiTableRightDescr>
Performs blob detection on the <em>work image</em>.</td>
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLSyn>
Lua synopsis
</td> 
<td class=apiTableRightLSyn>number trigger,string packedPacket=simVision.blobDetectionOnWorkImg(number handle,number threshold,number minBlobSize,bool diffColor,table_3 overlayColor={1.0,0.0,1.0}))</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLParam>Lua parameters</td> 
<td class=apiTableRightLParam>
<div><strong>handle</strong>: handle of the vision sensor, or sim.handle_self if the object attached to this script is the vision sensor.</div>
<div><strong>threshold</strong>: the intensity threshold for a pixel to be considered <em>on</em>. </div>
<div><strong>minBlobSize</strong>: the minimum size of a blob (in relation to the total image surface).</div>
<div><strong>diffColor</strong>: if true then each blob will be represented in a different color.</div>
<div><strong>overlayColor</strong>: an overlay color used to visualize the blobs. Set to nil for no overlay.</div>
</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLRet>
Lua return values
</td> 
<td class=apiTableRightLRet>
<div><strong>trigger</strong>: always false. Not used.</div>
<div><strong>packedPacket</strong>: a packed packet (use <a href="regularApi/simUnpackFloatTable.htm">sim.unpackFloatTable</a> to unpack) containing:</div>
<div>a) the number of detected blobs</div>
<div>b) the number of values returned for each blob</div>
<div>then for each blob:</div>
<div>c.1) the blob relative size</div>
<div>c.2) the blob orientation</div>
<div>c.3) the blob relative position X</div>
<div>c.4) the blob relative position Y</div>
<div>c.5) the blob bounding box relative width</div>
<div>c.6) the blob bounding box relative height</div>
</td> 
</tr> 
</table> 
<br>





<h3 class=subsectionBarTab><a name="simVision.buffer1ToWorkImg" id="simVision.buffer1ToWorkImg"></a>simVision.buffer1ToWorkImg</h3>
<table class=apiTableTab>
<tr class=apiTableTr> 
<td class=apiTableLeftDescr>
Description 
</td> 
<td class=apiTableRightDescr>
Copies buffer <em>buffer1</em> to the <em>work image</em>. See also <a href="#simVision.buffer2ToWorkImg">simVision.buffer2ToWorkImg</a>, <a href="#simVision.workImgToBuffer1">simVision.workImgToBuffer1</a>, <a href="#simVision.swapBuffers">simVision.swapBuffers</a> and <a href="#simVision.swapWorkImgWithBuffer1">simVision.swapWorkImgWithBuffer1</a>.</td>
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLSyn>
Lua synopsis
</td> 
<td class=apiTableRightLSyn>simVision.buffer1ToWorkImg(number handle)</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLParam>Lua parameters</td> 
<td class=apiTableRightLParam>
<div><strong>handle</strong>: handle of the vision sensor, or sim.handle_self if the object attached to this script is the vision sensor.</div>
</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLRet>
Lua return values
</td> 
<td class=apiTableRightLRet>
<div>none</div></td> 
</tr> 
</table> 
<br>





<h3 class=subsectionBarTab><a name="simVision.buffer2ToWorkImg" id="simVision.buffer2ToWorkImg"></a>simVision.buffer2ToWorkImg</h3>
<table class=apiTableTab>
<tr class=apiTableTr> 
<td class=apiTableLeftDescr>
Description 
</td> 
<td class=apiTableRightDescr>
Copies buffer <em>buffer2</em> to the <em>work image</em>. See also <a href="#simVision.buffer1ToWorkImg">simVision.buffer1ToWorkImg</a>, <a href="#simVision.workImgToBuffer2">simVision.workImgToBuffer2</a> and <a href="#simVision.swapBuffers">simVision.swapBuffers</a>.</td>
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLSyn>
Lua synopsis
</td> 
<td class=apiTableRightLSyn>simVision.buffer2ToWorkImg(number handle)</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLParam>Lua parameters</td> 
<td class=apiTableRightLParam>
<div><strong>handle</strong>: handle of the vision sensor, or sim.handle_self if the object attached to this script is the vision sensor.</div>
</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLRet>
Lua return values
</td> 
<td class=apiTableRightLRet>
<div>none</div></td> 
</tr> 
</table> 
<br>





<h3 class=subsectionBarTab><a name="simVision.changedPixelsOnWorkImg" id="simVision.changedPixelsOnWorkImg"></a>simVision.changedPixelsOnWorkImg</h3>
<table class=apiTableTab>
<tr class=apiTableTr> 
<td class=apiTableLeftDescr>
Description 
</td> 
<td class=apiTableRightDescr>
Returns the pixels that changed the <em>work image</em>, from one frame to the next.</td>
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLSyn>
Lua synopsis
</td> 
<td class=apiTableRightLSyn>number trigger,string packedPacket=simVision.changedPixelsOnWorkImg(number handle,number threshold)</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLParam>Lua parameters</td> 
<td class=apiTableRightLParam>
<div><strong>handle</strong>: handle of the vision sensor, or sim.handle_self if the object attached to this script is the vision sensor.</div>
<div><strong>threshold</strong>: the minimum intensity variation for a pixel to have changed.</div>
</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLRet>
Lua return values
</td> 
<td class=apiTableRightLRet>
<div><strong>trigger</strong>: always false. Not used.</div>
<div><strong>packedPacket</strong>: a packed packet (use <a href="regularApi/simUnpackFloatTable.htm">sim.unpackFloatTable</a> to unpack) containing for each changed pixel:</div>
<div>a.1) 1 if the pixel became brighter, -1 otherwise</div>
<div>a.2) the x coordinate of the pixel</div>
<div>a.3) the y coordinate of the pixel</div>
</td> 
</tr> 
</table> 
<br>





<h3 class=subsectionBarTab><a name="simVision.circularCutWorkImg" id="simVision.circularCutWorkImg"></a>simVision.circularCutWorkImg</h3>
<table class=apiTableTab>
<tr class=apiTableTr> 
<td class=apiTableLeftDescr>
Description 
</td> 
<td class=apiTableRightDescr>
Performs a circular cut on the <em>work image</em>.</td>
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLSyn>
Lua synopsis
</td> 
<td class=apiTableRightLSyn>simVision.circularCutWorkImg(number handle,number radius,boolean toBuffer1)</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLParam>Lua parameters</td> 
<td class=apiTableRightLParam>
<div><strong>handle</strong>: handle of the vision sensor, or sim.handle_self if the object attached to this script is the vision sensor.</div>
<div><strong>radius</strong>: the radius of the disc, expressed proportionally to the image resolution. Pixels outside of the disc's bounds are removed.</div>
<div><strong>toBuffer1</strong>: if true, then the removed pixels are copied to buffer <em>buffer1</em>.</div>
</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLRet>
Lua return values
</td> 
<td class=apiTableRightLRet>
<div>none</div></td> 
</tr> 
</table> 
<br>





<h3 class=subsectionBarTab><a name="simVision.colorSegmentationOnWorkImg" id="simVision.colorSegmentationOnWorkImg"></a>simVision.colorSegmentationOnWorkImg</h3>
<table class=apiTableTab>
<tr class=apiTableTr> 
<td class=apiTableLeftDescr>
Description 
</td> 
<td class=apiTableRightDescr>
Performs a color segmentation on the <em>work image</em>.</td>
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLSyn>
Lua synopsis
</td> 
<td class=apiTableRightLSyn>simVision.colorSegmentationOnWorkImg(number handle,number colorDistance)</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLParam>Lua parameters</td> 
<td class=apiTableRightLParam>
<div><strong>handle</strong>: handle of the vision sensor, or sim.handle_self if the object attached to this script is the vision sensor.</div>
<div><strong>colorDistance</strong>: the color distance to be used as threshold.</div>
</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLRet>
Lua return values
</td> 
<td class=apiTableRightLRet>
<div>none</div></td> 
</tr> 
</table> 
<br>





<h3 class=subsectionBarTab><a name="simVision.coordinatesFromWorkImg" id="simVision.coordinatesFromWorkImg"></a>simVision.coordinatesFromWorkImg</h3>
<table class=apiTableTab>
<tr class=apiTableTr> 
<td class=apiTableLeftDescr>
Description 
</td> 
<td class=apiTableRightDescr>
Extracts coordinates from the <em>work image</em> (based on the view field of a vision sensor).</td>
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLSyn>
Lua synopsis
</td> 
<td class=apiTableRightLSyn>number trigger,string packedPacket=simVision.coordinatesFromWorkImg(number handle,table_2 pointCount,boolean angularSpace)</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLParam>Lua parameters</td> 
<td class=apiTableRightLParam>
<div><strong>handle</strong>: handle of the vision sensor. Can be combined with sim.handleflag_abscoords in order to retrieve points relative to the absolute reference frame, instead of the vision sensor reference frame.</div>
<div><strong>pointCount</strong>: the desired point count along X and Y.</div>
<div><strong>angularSpace</strong>: whether the point sampling happens in the cartesian or angular space (within a given direction).</div>
</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLRet>
Lua return values
</td> 
<td class=apiTableRightLRet>
<div><strong>trigger</strong>: always false. Not used.</div>
<div><strong>packedPacket</strong>: a packed packet (use <a href="regularApi/simUnpackFloatTable.htm">sim.unpackFloatTable</a> to unpack) containing:</div>
<div>a) the number of points along X</div>
<div>b) the number of points along Y</div>
<div>then for each points:</div>
<div>c.1) the x coordinate of the point</div>
<div>c.2) the y coordinate of the point</div>
<div>c.3) the z coordinate of the point</div>
<div>c.4) the distance to the point</div>
</td> 
</tr> 
</table> 
<br>





<h3 class=subsectionBarTab><a name="simVision.edgeDetectionOnWorkImg" id="simVision.edgeDetectionOnWorkImg"></a>simVision.edgeDetectionOnWorkImg</h3>
<table class=apiTableTab>
<tr class=apiTableTr> 
<td class=apiTableLeftDescr>
Description 
</td> 
<td class=apiTableRightDescr>
Applies an edge detection filter to the <em>work image</em>. See also <a href="#simVision.matrix3x3OnWorkImg">simVision.matrix3x3OnWorkImg</a> and <a href="#simVision.matrix5x5OnWorkImg">simVision.matrix5x5OnWorkImg</a>.</td>
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLSyn>
Lua synopsis
</td> 
<td class=apiTableRightLSyn>simVision.edgeDetectionOnWorkImg(number handle,number threshold)</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLParam>Lua parameters</td> 
<td class=apiTableRightLParam>
<div><strong>handle</strong>: handle of the vision sensor, or sim.handle_self if the object attached to this script is the vision sensor.</div>
<div><strong>threshold</strong>: the threshold value.</div>
</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLRet>
Lua return values
</td> 
<td class=apiTableRightLRet>
<div>none</div></td> 
</tr> 
</table> 
<br>





<h3 class=subsectionBarTab><a name="simVision.horizontalFlipWorkImg" id="simVision.horizontalFlipWorkImg"></a>simVision.horizontalFlipWorkImg</h3>
<table class=apiTableTab>
<tr class=apiTableTr> 
<td class=apiTableLeftDescr>
Description 
</td> 
<td class=apiTableRightDescr>
Horizontally flips the <em>work image</em>. See also <a href="#simVision.verticalFlipWorkImg">simVision.verticalFlipWorkImg</a>.</td>
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLSyn>
Lua synopsis
</td> 
<td class=apiTableRightLSyn>simVision.horizontalFlipWorkImg(number handle)</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLParam>Lua parameters</td> 
<td class=apiTableRightLParam>
<div><strong>handle</strong>: handle of the vision sensor, or sim.handle_self if the object attached to this script is the vision sensor.</div>
</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLRet>
Lua return values
</td> 
<td class=apiTableRightLRet>
<div>none</div></td> 
</tr> 
</table> 
<br>





<h3 class=subsectionBarTab><a name="simVision.intensityScaleOnWorkImg" id="simVision.intensityScaleOnWorkImg"></a>simVision.intensityScaleOnWorkImg</h3>
<table class=apiTableTab>
<tr class=apiTableTr> 
<td class=apiTableLeftDescr>
Description 
</td> 
<td class=apiTableRightDescr>
Transforms the <em>work image</em> into an intensity representation.</td>
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLSyn>
Lua synopsis
</td> 
<td class=apiTableRightLSyn>simVision.intensityScaleOnWorkImg(number handle,number start,number end,boolean greyscale)</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLParam>Lua parameters</td> 
<td class=apiTableRightLParam>
<div><strong>handle</strong>: handle of the vision sensor, or sim.handle_self if the object attached to this script is the vision sensor.</div>
<div><strong>start</strong>: the value representing the minimum intensity.</div>
<div><strong>end</strong>: the value representing the maximum intensity.</div>
<div><strong>greyscale</strong>: if true, the output is a grey scale image, otherwise it is a color coded intensity image.</div>
</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLRet>
Lua return values
</td> 
<td class=apiTableRightLRet>
<div>none</div></td> 
</tr> 
</table> 
<br>





<h3 class=subsectionBarTab><a name="simVision.matrix3x3OnWorkImg" id="simVision.matrix3x3OnWorkImg"></a>simVision.matrix3x3OnWorkImg</h3>
<table class=apiTableTab>
<tr class=apiTableTr> 
<td class=apiTableLeftDescr>
Description 
</td> 
<td class=apiTableRightDescr>
Applies a 3X3 matrix filter to the <em>work image</em>.</td>
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLSyn>
Lua synopsis
</td> 
<td class=apiTableRightLSyn>simVision.matrix3x3OnWorkImg(number handle,number passes,number multiplier,table_9 matrix)</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLParam>Lua parameters</td> 
<td class=apiTableRightLParam>
<div><strong>handle</strong>: handle of the vision sensor, or sim.handle_self if the object attached to this script is the vision sensor.</div>
<div><strong>passes</strong>: the number of desired filter passes.</div>
<div><strong>multiplier</strong>: a matrix multiplier.</div>
<div><strong>matrix</strong>: the 3X3 matrix.</div>
</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLRet>
Lua return values
</td> 
<td class=apiTableRightLRet>
<div>none</div></td> 
</tr> 
</table> 
<br>





<h3 class=subsectionBarTab><a name="simVision.matrix5x5OnWorkImg" id="simVision.matrix5x5OnWorkImg"></a>simVision.matrix5x5OnWorkImg</h3>
<table class=apiTableTab>
<tr class=apiTableTr> 
<td class=apiTableLeftDescr>
Description 
</td> 
<td class=apiTableRightDescr>
Applies a 5X5 matrix filter to the <em>work image</em>.</td>
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLSyn>
Lua synopsis
</td> 
<td class=apiTableRightLSyn>simVision.matrix5x5OnWorkImg(number handle,number passes,number multiplier,table_25 matrix)</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLParam>Lua parameters</td> 
<td class=apiTableRightLParam>
<div><strong>handle</strong>: handle of the vision sensor, or sim.handle_self if the object attached to this script is the vision sensor.</div>
<div><strong>passes</strong>: the number of desired filter passes.</div>
<div><strong>multiplier</strong>: a matrix multiplier.</div>
<div><strong>matrix</strong>: the 5X5 matrix.</div>
</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLRet>
Lua return values
</td> 
<td class=apiTableRightLRet>
<div>none</div></td> 
</tr> 
</table> 
<br>





<h3 class=subsectionBarTab><a name="simVision.multiplyWorkImgWithBuffer1" id="simVision.multiplyWorkImgWithBuffer1"></a>simVision.multiplyWorkImgWithBuffer1</h3>
<table class=apiTableTab>
<tr class=apiTableTr> 
<td class=apiTableLeftDescr>
Description 
</td> 
<td class=apiTableRightDescr>
Multiplies (pixel wise) the <em>work image</em> with buffer <em>buffer1</em>, and stores the result in the <em>work image</em>.</td>
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLSyn>
Lua synopsis
</td> 
<td class=apiTableRightLSyn>simVision.multiplyWorkImgWithBuffer1(number handle)</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLParam>Lua parameters</td> 
<td class=apiTableRightLParam>
<div><strong>handle</strong>: handle of the vision sensor, or sim.handle_self if the object attached to this script is the vision sensor.</div>
</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLRet>
Lua return values
</td> 
<td class=apiTableRightLRet>
<div>none</div></td> 
</tr> 
</table> 
<br>





<h3 class=subsectionBarTab><a name="simVision.normalizeWorkImg" id="simVision.normalizeWorkImg"></a>simVision.normalizeWorkImg</h3>
<table class=apiTableTab>
<tr class=apiTableTr> 
<td class=apiTableLeftDescr>
Description 
</td> 
<td class=apiTableRightDescr>
Normalizes the <em>work image</em>.</td>
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLSyn>
Lua synopsis
</td> 
<td class=apiTableRightLSyn>simVision.normalizeWorkImg(number handle)</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLParam>Lua parameters</td> 
<td class=apiTableRightLParam>
<div><strong>handle</strong>: handle of the vision sensor, or sim.handle_self if the object attached to this script is the vision sensor.</div>
</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLRet>
Lua return values
</td> 
<td class=apiTableRightLRet>
<div>none</div></td> 
</tr> 
</table> 
<br>





<h3 class=subsectionBarTab><a name="simVision.rectangularCutWorkImg" id="simVision.rectangularCutWorkImg"></a>simVision.rectangularCutWorkImg</h3>
<table class=apiTableTab>
<tr class=apiTableTr> 
<td class=apiTableLeftDescr>
Description 
</td> 
<td class=apiTableRightDescr>
Performs a rectangular cut on the <em>work image</em>.</td>
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLSyn>
Lua synopsis
</td> 
<td class=apiTableRightLSyn>simVision.rectangularCutWorkImg(number handle,table_2 rectangle,boolean toBuffer1)</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLParam>Lua parameters</td> 
<td class=apiTableRightLParam>
<div><strong>handle</strong>: handle of the vision sensor, or sim.handle_self if the object attached to this script is the vision sensor.</div>
<div><strong>rectangle</strong>: the x/y size of the rectangle, expressed proportionally to the image resolution. Pixels outside of the rectangle's bounds are removed.</div>
<div><strong>toBuffer1</strong>: if true, then the removed pixels are copied to buffer <em>buffer1</em>.</div>
</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLRet>
Lua return values
</td> 
<td class=apiTableRightLRet>
<div>none</div></td> 
</tr> 
</table> 
<br>





<h3 class=subsectionBarTab><a name="simVision.resizeWorkImg" id="simVision.resizeWorkImg"></a>simVision.resizeWorkImg</h3>
<table class=apiTableTab>
<tr class=apiTableTr> 
<td class=apiTableLeftDescr>
Description 
</td> 
<td class=apiTableRightDescr>
Scales the <em>work image</em>. The resolution remains same.</td>
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLSyn>
Lua synopsis
</td> 
<td class=apiTableRightLSyn>simVision.resizeWorkImg(number handle,table_2 scaling)</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLParam>Lua parameters</td> 
<td class=apiTableRightLParam>
<div><strong>handle</strong>: handle of the vision sensor, or sim.handle_self if the object attached to this script is the vision sensor.</div>
<div><strong>scaling</strong>: the x/y scaling.</div>
</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLRet>
Lua return values
</td> 
<td class=apiTableRightLRet>
<div>none</div></td> 
</tr> 
</table> 
<br>





<h3 class=subsectionBarTab><a name="simVision.rotateWorkImg" id="simVision.rotateWorkImg"></a>simVision.rotateWorkImg</h3>
<table class=apiTableTab>
<tr class=apiTableTr> 
<td class=apiTableLeftDescr>
Description 
</td> 
<td class=apiTableRightDescr>
Performs a rotation of the <em>work image</em>.</td>
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLSyn>
Lua synopsis
</td> 
<td class=apiTableRightLSyn>simVision.rotateWorkImg(number handle,number angle)</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLParam>Lua parameters</td> 
<td class=apiTableRightLParam>
<div><strong>handle</strong>: handle of the vision sensor, or sim.handle_self if the object attached to this script is the vision sensor.</div>
<div><strong>angle</strong>: the rotation angle in radians.</div>
</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLRet>
Lua return values
</td> 
<td class=apiTableRightLRet>
<div>none</div></td> 
</tr> 
</table> 
<br>





<h3 class=subsectionBarTab><a name="simVision.scaleAndOffsetWorkImg" id="simVision.scaleAndOffsetWorkImg"></a>simVision.scaleAndOffsetWorkImg</h3>
<table class=apiTableTab>
<tr class=apiTableTr> 
<td class=apiTableLeftDescr>
Description 
</td> 
<td class=apiTableRightDescr>
Shifts and scales colors of the <em>work image</em>, in the RGB or HSL space: colorOut=postOffset+(colorIn+preOffset)*scaling</td>
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLSyn>
Lua synopsis
</td> 
<td class=apiTableRightLSyn>simVision.scaleAndOffsetWorkImg(number handle,table_3 colorPreOffset,table_3 colorScaling,table_3 colorPostOffset,boolean rgbSpace)</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLParam>Lua parameters</td> 
<td class=apiTableRightLParam>
<div><strong>handle</strong>: handle of the vision sensor, or sim.handle_self if the object attached to this script is the vision sensor.</div>
<div><strong>colorPreOffset</strong>: the pre-offset, in RGB or HSL space.</div>
<div><strong>colorScaling</strong>: the scaling, in RGB or HSL space.</div>
<div><strong>colorPostOffset</strong>: the post-offset, in RGB or HSL space.</div>
<div><strong>rgbSpace</strong>: if true, values are in the RGB space, otherwise they are in the HSL space.</div>
</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLRet>
Lua return values
</td> 
<td class=apiTableRightLRet>
<div>none</div></td> 
</tr> 
</table> 
<br>





<h3 class=subsectionBarTab><a name="simVision.selectiveColorOnWorkImg" id="simVision.selectiveColorOnWorkImg"></a>simVision.selectiveColorOnWorkImg</h3>
<table class=apiTableTab>
<tr class=apiTableTr> 
<td class=apiTableLeftDescr>
Description 
</td> 
<td class=apiTableRightDescr>
Selects a specific color in the RGB or HSL space of the <em>work image</em>.</td>
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLSyn>
Lua synopsis
</td> 
<td class=apiTableRightLSyn>simVision.selectiveColorOnWorkImg(number handle,table_3 nominalColor,table_3 colorTolerance,boolean rgbSpace,boolean keepColor,boolean toBuffer1)</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLParam>Lua parameters</td> 
<td class=apiTableRightLParam>
<div><strong>handle</strong>: handle of the vision sensor, or sim.handle_self if the object attached to this script is the vision sensor.</div>
<div><strong>nominalColor</strong>: the nominal color to select, in RGB or HSL space.</div>
<div><strong>colorTolerance</strong>: the tolerance around the nominal color, in RGB or HSL space.</div>
<div><strong>rgbSpace</strong>: if true, values are in the RGB space, otherwise they are in the HSL space.</div>
<div><strong>keepColor</strong>: if true, the specified color is kept, otherwise it is removed.</div>
<div><strong>toBuffer1</strong>: if true, the removed color is copied to buffer <em>buffer1</em>.</div>
</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLRet>
Lua return values
</td> 
<td class=apiTableRightLRet>
<div>none</div></td> 
</tr> 
</table> 
<br>





<h3 class=subsectionBarTab><a name="simVision.sensorDepthMapToWorkImg" id="simVision.sensorDepthMapToWorkImg"></a>simVision.sensorDepthMapToWorkImg</h3>
<table class=apiTableTab>
<tr class=apiTableTr> 
<td class=apiTableLeftDescr>
Description 
</td> 
<td class=apiTableRightDescr>
Copies the depth buffer acquired by a vision sensor to the <em>work image</em> (buffer used for image processing). see also <a href="#simVision.sensorImgToWorkImg">simVision.sensorImgToWorkImg</a> and <a href="#simVision.workImgToSensorImg">simVision.workImgToSensorImg</a>.</td>
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLSyn>
Lua synopsis
</td> 
<td class=apiTableRightLSyn>simVision.sensorDepthMapToWorkImg(number handle)</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLParam>Lua parameters</td> 
<td class=apiTableRightLParam>
<div><strong>handle</strong>: handle of the vision sensor, or sim.handle_self if the object attached to this script is the vision sensor.</div>
</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLRet>
Lua return values
</td> 
<td class=apiTableRightLRet>
<div>none</div></td> 
</tr> 
</table> 
<br>





<h3 class=subsectionBarTab><a name="simVision.sensorImgToWorkImg" id="simVision.sensorImgToWorkImg"></a>simVision.sensorImgToWorkImg</h3>
<table class=apiTableTab>
<tr class=apiTableTr> 
<td class=apiTableLeftDescr>
Description 
</td> 
<td class=apiTableRightDescr>
Copies the RGB image acquired by a vision sensor to the <em>work image</em> (buffer used for image processing). See also <a href="#simVision.sensorDepthMapToWorkImg">simVision.sensorDepthMapToWorkImg</a> and <a href="#simVision.workImgToSensorImg">simVision.workImgToSensorImg</a>.</td>
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLSyn>
Lua synopsis
</td> 
<td class=apiTableRightLSyn>simVision.sensorImgToWorkImg(number handle)</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLParam>Lua parameters</td> 
<td class=apiTableRightLParam>
<div><strong>handle</strong>: handle of the vision sensor, or sim.handle_self if the object attached to this script is the vision sensor.</div>
</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLRet>
Lua return values
</td> 
<td class=apiTableRightLRet>
<div>none</div></td> 
</tr> 
</table> 
<br>





<h3 class=subsectionBarTab><a name="simVision.sharpenWorkImg" id="simVision.sharpenWorkImg"></a>simVision.sharpenWorkImg</h3>
<table class=apiTableTab>
<tr class=apiTableTr> 
<td class=apiTableLeftDescr>
Description 
</td> 
<td class=apiTableRightDescr>
Sharpens the <em>work image</em>. See also <a href="#simVision.matrix3x3OnWorkImg">simVision.matrix3x3OnWorkImg</a> and <a href="#simVision.matrix5x5OnWorkImg">simVision.matrix5x5OnWorkImg</a>.</td>
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLSyn>
Lua synopsis
</td> 
<td class=apiTableRightLSyn>simVision.sharpenWorkImg(number handle)</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLParam>Lua parameters</td> 
<td class=apiTableRightLParam>
<div><strong>handle</strong>: handle of the vision sensor, or sim.handle_self if the object attached to this script is the vision sensor.</div>
</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLRet>
Lua return values
</td> 
<td class=apiTableRightLRet>
<div>none</div></td> 
</tr> 
</table> 
<br>





<h3 class=subsectionBarTab><a name="simVision.shiftWorkImg" id="simVision.shiftWorkImg"></a>simVision.shiftWorkImg</h3>
<table class=apiTableTab>
<tr class=apiTableTr> 
<td class=apiTableLeftDescr>
Description 
</td> 
<td class=apiTableRightDescr>
Shifts the <em>work image</em>.</td>
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLSyn>
Lua synopsis
</td> 
<td class=apiTableRightLSyn>simVision.shiftWorkImg(number handle,table_2 shift,boolean wrap)</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLParam>Lua parameters</td> 
<td class=apiTableRightLParam>
<div><strong>handle</strong>: handle of the vision sensor, or sim.handle_self if the object attached to this script is the vision sensor.</div>
<div><strong>shift</strong>: the x/y shift amount, proportional to the image resolution (0=no shift, 1=shift by x/y resolution pixels).</div>
<div><strong>wrap</strong>: whether parts shifted outside the image frame wrap around.</div>
</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLRet>
Lua return values
</td> 
<td class=apiTableRightLRet>
<div>none</div></td> 
</tr> 
</table> 
<br>





<h3 class=subsectionBarTab><a name="simVision.subtractBuffer1FromWorkImg" id="simVision.subtractBuffer1FromWorkImg"></a>simVision.subtractBuffer1FromWorkImg</h3>
<table class=apiTableTab>
<tr class=apiTableTr> 
<td class=apiTableLeftDescr>
Description 
</td> 
<td class=apiTableRightDescr>
Subtracts (pixel wise subtraction) buffer <em>buffer1</em> from the <em>work image</em>. See also <a href="#simVision.subtractWorkImgFromBuffer1">simVision.subtractWorkImgFromBuffer1</a> and <a href="#simVision.addBuffer1ToWorkImg">simVision.addBuffer1ToWorkImg</a>.</td>
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLSyn>
Lua synopsis
</td> 
<td class=apiTableRightLSyn>simVision.subtractBuffer1FromWorkImg(number handle)</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLParam>Lua parameters</td> 
<td class=apiTableRightLParam>
<div><strong>handle</strong>: handle of the vision sensor, or sim.handle_self if the object attached to this script is the vision sensor.</div>
</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLRet>
Lua return values
</td> 
<td class=apiTableRightLRet>
<div>none</div></td> 
</tr> 
</table> 
<br>





<h3 class=subsectionBarTab><a name="simVision.subtractWorkImgFromBuffer1" id="simVision.subtractWorkImgFromBuffer1"></a>simVision.subtractWorkImgFromBuffer1</h3>
<table class=apiTableTab>
<tr class=apiTableTr> 
<td class=apiTableLeftDescr>
Description 
</td> 
<td class=apiTableRightDescr>
Subtracts (pixel wise subtraction) the <em>work image</em> from buffer <em>buffer1</em>. See also <a href="#simVision.subtractBuffer1FromWorkImg">simVision.subtractBuffer1FromWorkImg</a> and <a href="#simVision.addWorkImgToBuffer1">simVision.addWorkImgToBuffer1</a>.</td>
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLSyn>
Lua synopsis
</td> 
<td class=apiTableRightLSyn>simVision.subtractWorkImgFromBuffer1(number handle)</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLParam>Lua parameters</td> 
<td class=apiTableRightLParam>
<div><strong>handle</strong>: handle of the vision sensor, or sim.handle_self if the object attached to this script is the vision sensor.</div>
</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLRet>
Lua return values
</td> 
<td class=apiTableRightLRet>
<div>none</div></td> 
</tr> 
</table> 
<br>





<h3 class=subsectionBarTab><a name="simVision.swapBuffers" id="simVision.swapBuffers"></a>simVision.swapBuffers</h3>
<table class=apiTableTab>
<tr class=apiTableTr> 
<td class=apiTableLeftDescr>
Description 
</td> 
<td class=apiTableRightDescr>
Swaps buffer <em>buffer1</em> with buffer <em>buffer2</em>. See also <a href="#simVision.swapWorkImgWithBuffer1">simVision.swapWorkImgWithBuffer1</a>.</td>
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLSyn>
Lua synopsis
</td> 
<td class=apiTableRightLSyn>simVision.swapBuffers(number handle)</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLParam>Lua parameters</td> 
<td class=apiTableRightLParam>
<div><strong>handle</strong>: handle of the vision sensor, or sim.handle_self if the object attached to this script is the vision sensor.</div>
</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLRet>
Lua return values
</td> 
<td class=apiTableRightLRet>
<div>none</div></td> 
</tr> 
</table> 
<br>





<h3 class=subsectionBarTab><a name="simVision.swapWorkImgWithBuffer1" id="simVision.swapWorkImgWithBuffer1"></a>simVision.swapWorkImgWithBuffer1</h3>
<table class=apiTableTab>
<tr class=apiTableTr> 
<td class=apiTableLeftDescr>
Description 
</td> 
<td class=apiTableRightDescr>
Swaps the <em>work image</em> with buffer <em>buffer1</em>. See also <a href="#simVision.swapBuffers">simVision.swapBuffers</a>.</td>
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLSyn>
Lua synopsis
</td> 
<td class=apiTableRightLSyn>simVision.swapWorkImgWithBuffer1(number handle)</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLParam>Lua parameters</td> 
<td class=apiTableRightLParam>
<div><strong>handle</strong>: handle of the vision sensor, or sim.handle_self if the object attached to this script is the vision sensor.</div>
</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLRet>
Lua return values
</td> 
<td class=apiTableRightLRet>
<div>none</div></td> 
</tr> 
</table> 
<br>





<h3 class=subsectionBarTab><a name="simVision.uniformImgToWorkImg" id="simVision.uniformImgToWorkImg"></a>simVision.uniformImgToWorkImg</h3>
<table class=apiTableTab>
<tr class=apiTableTr> 
<td class=apiTableLeftDescr>
Description 
</td> 
<td class=apiTableRightDescr>
Applies a uniform color to the <em>work image</em> (buffer used for image processing)</td>
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLSyn>
Lua synopsis
</td> 
<td class=apiTableRightLSyn>simVision.uniformImgToWorkImg(number handle,table_3 color)</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLParam>Lua parameters</td> 
<td class=apiTableRightLParam>
<div><strong>handle</strong>: handle of the vision sensor, or sim.handle_self if the object attached to this script is the vision sensor.</div>
<div><strong>color</strong>: a table containing the RGB-triplet for the color (in the range of 0-1).</div>
</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLRet>
Lua return values
</td> 
<td class=apiTableRightLRet>
<div>none</div></td> 
</tr> 
</table> 
<br>





<h3 class=subsectionBarTab><a name="simVision.velodyneDataFromWorkImg" id="simVision.velodyneDataFromWorkImg"></a>simVision.velodyneDataFromWorkImg</h3>
<table class=apiTableTab>
<tr class=apiTableTr> 
<td class=apiTableLeftDescr>
Description 
</td> 
<td class=apiTableRightDescr>
Extracts Velodyne coordinates from the <em>work image</em> (based on the view field of a vision sensor).</td>
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLSyn>
Lua synopsis
</td> 
<td class=apiTableRightLSyn>number trigger,string packedPacket=simVision.velodyneDataFromWorkImg(number handle,table_2 pointCount,number verticalScanAngle)</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLParam>Lua parameters</td> 
<td class=apiTableRightLParam>
<div><strong>handle</strong>: handle of the vision sensor. Can be combined with sim.handleflag_abscoords in order to retrieve points relative to the absolute reference frame, instead of the vision sensor reference frame.</div>
<div><strong>pointCount</strong>: the desired point count along X and Y.</div>
<div><strong>verticalScanAngle</strong>: the vertical scan angle.</div>
</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLRet>
Lua return values
</td> 
<td class=apiTableRightLRet>
<div><strong>trigger</strong>: always false. Not used.</div>
<div><strong>packedPacket</strong>: a packed packet (use <a href="regularApi/simUnpackFloatTable.htm">sim.unpackFloatTable</a> to unpack) containing:</div>
<div>a) the number of points along X</div>
<div>b) the number of points along Y</div>
<div>then for each points:</div>
<div>c.1) the x coordinate of the point</div>
<div>c.2) the y coordinate of the point</div>
<div>c.3) the z coordinate of the point</div>
<div>c.4) the distance from the sensor to the point</div>
</td> 
</tr> 
</table> 
<br>





<h3 class=subsectionBarTab><a name="simVision.verticalFlipWorkImg" id="simVision.verticalFlipWorkImg"></a>simVision.verticalFlipWorkImg</h3>
<table class=apiTableTab>
<tr class=apiTableTr> 
<td class=apiTableLeftDescr>
Description 
</td> 
<td class=apiTableRightDescr>
Vertically flips the <em>work image</em>. See also <a href="#simVision.horizontalFlipWorkImg">simVision.horizontalFlipWorkImg</a>.</td>
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLSyn>
Lua synopsis
</td> 
<td class=apiTableRightLSyn>simVision.verticalFlipWorkImg(number handle)</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLParam>Lua parameters</td> 
<td class=apiTableRightLParam>
<div><strong>handle</strong>: handle of the vision sensor, or sim.handle_self if the object attached to this script is the vision sensor.</div>
</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLRet>
Lua return values
</td> 
<td class=apiTableRightLRet>
<div>none</div></td> 
</tr> 
</table> 
<br>





<h3 class=subsectionBarTab><a name="simVision.workImgToBuffer1" id="simVision.workImgToBuffer1"></a>simVision.workImgToBuffer1</h3>
<table class=apiTableTab>
<tr class=apiTableTr> 
<td class=apiTableLeftDescr>
Description 
</td> 
<td class=apiTableRightDescr>
Copies the <em>work image</em> to buffer <em>buffer1</em>. See also <a href="#simVision.workImgToBuffer2">simVision.workImgToBuffer2</a>, <a href="#simVision.buffer1ToWorkImg">simVision.buffer1ToWorkImg</a>, <a href="#simVision.swapBuffers">simVision.swapBuffers</a> and <a href="#simVision.swapWorkImgWithBuffer1">simVision.swapWorkImgWithBuffer1</a>.</td>
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLSyn>
Lua synopsis
</td> 
<td class=apiTableRightLSyn>simVision.workImgToBuffer1(number handle)</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLParam>Lua parameters</td> 
<td class=apiTableRightLParam>
<div><strong>handle</strong>: handle of the vision sensor, or sim.handle_self if the object attached to this script is the vision sensor.</div>
</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLRet>
Lua return values
</td> 
<td class=apiTableRightLRet>
<div>none</div></td> 
</tr> 
</table> 
<br>





<h3 class=subsectionBarTab><a name="simVision.workImgToBuffer2" id="simVision.workImgToBuffer2"></a>simVision.workImgToBuffer2</h3>
<table class=apiTableTab>
<tr class=apiTableTr> 
<td class=apiTableLeftDescr>
Description 
</td> 
<td class=apiTableRightDescr>
Copies the <em>work image</em> to buffer <em>buffer2</em>. See also <a href="#simVision.workImgToBuffer1">simVision.workImgToBuffer1</a>, <a href="#simVision.buffer2ToWorkImg">simVision.buffer2ToWorkImg</a> and <a href="#simVision.swapBuffers">simVision.swapBuffers</a>.</td>
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLSyn>
Lua synopsis
</td> 
<td class=apiTableRightLSyn>simVision.workImgToBuffer2(number handle)</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLParam>Lua parameters</td> 
<td class=apiTableRightLParam>
<div><strong>handle</strong>: handle of the vision sensor, or sim.handle_self if the object attached to this script is the vision sensor.</div>
</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLRet>
Lua return values
</td> 
<td class=apiTableRightLRet>
<div>none</div></td> 
</tr> 
</table> 
<br>





<h3 class=subsectionBarTab><a name="simVision.workImgToSensorDepthMap" id="simVision.workImgToSensorDepthMap"></a>simVision.workImgToSensorDepthMap</h3>
<table class=apiTableTab>
<tr class=apiTableTr> 
<td class=apiTableLeftDescr>
Description 
</td> 
<td class=apiTableRightDescr>
Copies the <em>work image</em> (buffer used for image processing) to a vision sensor's depth buffer (each depth buffer pixel will be averaged from the image RGB-triplet). See also <a href="#simVision.workImgToSensorImg">simVision.workImgToSensorImg</a>.</td>
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLSyn>
Lua synopsis
</td> 
<td class=apiTableRightLSyn>simVision.workImgToSensorDepthMap(number handle)</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLParam>Lua parameters</td> 
<td class=apiTableRightLParam>
<div><strong>handle</strong>: handle of the vision sensor, or sim.handle_self if the object attached to this script is the vision sensor.</div>
</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLRet>
Lua return values
</td> 
<td class=apiTableRightLRet>
<div>none</div></td> 
</tr> 
</table> 
<br>




<h3 class=subsectionBarTab><a name="simVision.workImgToSensorImg" id="simVision.workImgToSensorImg"></a>simVision.workImgToSensorImg</h3>
<table class=apiTableTab>
<tr class=apiTableTr> 
<td class=apiTableLeftDescr>
Description 
</td> 
<td class=apiTableRightDescr>
Copies the <em>work image</em> (buffer used for image processing) to a vision sensor's RGB buffer. See also <a href="#simVision.sensorImgToWorkImg">simVision.sensorImgToWorkImg</a>.</td>
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLSyn>
Lua synopsis
</td> 
<td class=apiTableRightLSyn>simVision.workImgToSensorImg(number handle)</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLParam>Lua parameters</td> 
<td class=apiTableRightLParam>
<div><strong>handle</strong>: handle of the vision sensor, or sim.handle_self if the object attached to this script is the vision sensor.</div>
</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLRet>
Lua return values
</td> 
<td class=apiTableRightLRet>
<div>none</div></td> 
</tr> 
</table> 
<br>




<br>
 </tr>
</table> 
</div>  
  
  
</body>

</html>